package mail.claux.com;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class ErrorActivity extends Activity {
	/**
     * Called with the activity is first created.
     */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.error);
        
        final Button retry = (Button) this.findViewById(R.id.retry_button);
        final Button exit = (Button) this.findViewById(R.id.exit_button);
        
        //ClickListener associato al button "RETRY"
        retry.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
            	//ritorna all'activity principale (SendMailActivity)
            	Intent sendmail_intent = new Intent(getApplicationContext(),SendMailActivity.class);
                startActivity(sendmail_intent);
                //e termina l'activity corrente
                ErrorActivity.this.finish();
            }
        });
        
        //ClickListener associato al button "EXIT"
        exit.setOnClickListener(new View.OnClickListener() {
            public void onClick(View view) {
                //e termina l'activity corrente
                ErrorActivity.this.finish();
            }
        });
    }
}
